package com.tutu.feign.feignclient;

import com.tutu.commons.entity.Book;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Program: SpringCloud
 * @Description: openfeign调用book-server服务的客户端
 * @Author: JK.TuTu
 * @Version: 1.0
 * @Create: 2022-12-01 21:33
 **/
@FeignClient(value = "book-server")
public interface BookClient {
    @GetMapping("/book/{bid}")
    Book findBookById(@PathVariable("bid") int bid);
}